<template>
  <div class="custom-button" @click="onClick">
    <slot name="icon">
      <i class="iconfont custom-button-icon" :class="className" />
    </slot>
    <slot>
      {{ text }}
    </slot>
  </div>
</template>

<script>
export default {
  name: 'CustomButton',
  props: {
    className: {
      type: String,
      default: 'el-icon-circle-plus-outline'
    },
    text: {
      type: String,
      default: '新增'
    },
    onClick: {
      type: Function,
      default: () => {}
    }
  }
}
</script>

<style scoped></style>
